import Request from '@/utils/request'
import type { DisplayData, FeedbackData, ReportData } from '@/types/data'

/**
 * 获取统计分析数据
 */
export const getDisplayData = () => {
  return Request.get<DisplayData>('/admin/getdata')
}

/**
 * 获取反馈数据
 */
export const getFeedbackData = () => {
  return Request.get<FeedbackData>('/admin/getfeedback')
}

/**
 * 获取举报数据
 */
export const getReportData = () => {
  return Request.get<ReportData>('/admin/getreport')
}

/**
 * 已读
 */
export const updateReport = (id: number) => {
  return Request.put<null>('/admin/updatereport', { id })
}
